[CTX-0024] feat(pointer): pointer-online capability→encrypted object + offline 1024px+ - #34
Merged
Conversation
…+ offline 1024px+ - Server DB: message_objects table (id, capability_id FK, ciphertext BLOB, nonce, tag, content_key, created_at, policy) with capability_hash index and owner/allow authz (no IDOR) - Service: ChaCha20-Poly1305 (chacha20poly1305 0.11) aead_encrypt/decrypt with tag verify, store_message(ciphertext)->capability_id, encrypt_and_store, resolve_message with authz, store_offline/resolve_offline for 48B object_id+content_key (enforces 1024px+ at embed time) - Carrier: capglyph::pointer reuses capglyph_core framing (Pointer/Locator) + ECC (BCH/Repetition) + DCT/DWT differential; select_profile mirrors credential ladder; offline gate 1024 - CLI: capglyph pointer embed/extract/offline-embed/offline-extract + message encrypt/decrypt/store/resolve (cfg not wasm) - Tests: end-to-end encrypt→embed→extract→resolve→decrypt, IDOR negative, AEAD tamper, bearer, offline 1024 gate (pointer::tests::end_to_end_*) - HTTP: POST /v1/messages, POST /v1/messages/resolve, GET /v1/messages/:id - Docs: docs/pointer-and-stego.md - Wasm: pointer gated, getrandom wasm_js, cargo tree clean Closes CTX-0024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CTX-0024 — Pointer-mode stego: image → capability → encrypted object
Track: capglyph-cli + capglyph-server (isolation: ../capglyph-core, ../vectomancy)
Pointer-online (default): 128-bit capability_id (CSPRNG) →
capglyph_core::framing(CBOR + HMAC, PayloadType::Pointer) → ECC (BCH t=3 for 512 DCT, Repetition8 for 1024+ / DWT) → carrier (DCT F[3,4] / DWT LH). Extract via soft LLR, HMAC verify, serverresolve(capability_id, actor_id)with authz (no IDOR) → ChaCha20-Poly1305 decrypt (tag verify). Shares same carrier/ECC stack as credential.Pointer-offline: object_id (UUID 16 B) + content_key (32 B) = 48 B → framing Locator → ECC → carrier, 1024px+ gate enforced at embed time (
offline pointer requires image at least 1024x1024). Store viastore_offline, extract →resolve_offline(object_id, content_key, actor_id)with same policy check.Server DB:
message_objects(id, capability_id FK, capability_hash, ciphertext BLOB, nonce 12 B, tag 16 B, content_key, created_at, policy JSON, owner_id, expires_at) + indexes. Service:store_message(ciphertext)->capability_id,encrypt_and_store,resolve_message+ authz,aead_encrypt/decrypt(tag verify), offline variants. HTTP:POST /v1/messages,POST /v1/messages/resolve.CLI:
capglyph pointer embed/extract/offline-embed/offline-extract+capglyph message encrypt/decrypt/store/resolve(cfg not wasm).Tests: end-to-end encrypt→embed→extract→resolve→decrypt, IDOR negative (owner vs bad actor → 403), bearer (no owner) succeeds, AEAD tag tamper fails, offline 512 correctly rejects, offline 1024 roundtrip. All existing
framed/integration/registrationstill pass. Wasm: pointer gated,getrandom wasm_js,cargo tree --target wasm32-unknown-unknown | grep clap|globclean.Closes CTX-0024